<!DOCTYPE html>
<html lang="zh-hans">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<title>安全中心</title>
<link rel="stylesheet" href="__TEMPLATE__/webfile/layer.css" id="layui_layer_skinlayercss">
<link rel="stylesheet" href="__TEMPLATE__/webfile/main.css">
<script src="__TEMPLATE__/sysme/js/jquery-1.9.1.min.js"></script>
<title>安全中心</title>
<style type="text/css">

.box_menu {
    margin-top: 10px;
    width: 100%;
    height: 40px;
    font-size: 12px;
}

.menu_item.active {
    color: #f33131;
    border-bottom: 3px Solid #f33131;
}

.menu_item {
    display: inline-block;
    width: 80px;
    height: 37px;
    line-height: 37px;
    font-size: 14px;
    text-align: center;
    border-bottom: 3px Solid #ffffff;
    margin: 0px 20px 0px 20px;
    cursor: pointer;
}

.no_select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.box_container {
    margin-top: 0px;
    width: 100%;
    box-sizing: border-box;
    border: 1px Solid #ccc;
    height: 575px;
    position: relative;
}

.box_container ._box1 {
    padding: 8px 5px 8px 5px;
}

.check_box.active_d {
    background: red;
    color: #FFF;
    cursor: default;
}


.check_box {
    display: inline-block;
    width: 100px;
    line-height: 30px;
    height: 30px;
    text-align: center;
    font-size: 14px;
    color: red;
    border: 1px Solid red;
    cursor: pointer;
}

.btn_show_fandian_table {
    font-size: 12px;
    color: #f60;
    float: right;
    height: 40px;
    line-height: 40px;
    cursor: pointer;
}

.no_select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.box_container ._box2 {
    height: 60px;
    line-height: 60px;
    color: #555;
    font-family: "Microsoft Yahei";
    text-align: center;
    border-bottom: 1px dashed #999;
    padding: 10px 0px 10px 0px;
}

.box_container ._box3 {
    overflow-y: auto;
    height: 559px;
}

._box3 {
    box-sizing: border-box;
    padding: 10px 0px 30px 0px;
}



._box3 table {
    width: 100%;
    border-collapse: collapse;
}
.ex_custom_table {
    width: 100%;
    border-collapse: collapse;
}

._box3 table td {
    padding: 5px;
}


._box3 table thead tr {
    background: #eee;
    font-size: 12px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}


.ex_custom_table td:first-child {
    border-left: 0px;
}


._box3 table td {
    padding: 5px;
}

.ex_custom_table thead td {
    color: #DD3333;
    text-align: center;
    font-size: 12px;
    font-family: "Microsoft Yahei";
    font-weight: bold;
    text-shadow: #FFFFFF 0px 1px 0px;
}

.ex_custom_table td {
    border: 1px Solid #ccc;
    color: #333;
    font-size: 12px;
    font-family: "Microsoft Yahei";
}
.ex_custom_table thead tr {
    height: 30px;
    background: #dddddd;
}


.ex_custom_table td:last-child {
    border-right: 0px;
}

.ex_custom_table tbody tr {
    height: 30px;
    background: #ffffff;
}

.ex_custom_table td:first-child {
    border-left: 0px;
}


.ex_custom_table tbody tr td {
    text-align: center;
    height: 22px;
    line-height: 22px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ex_custom_table tbody tr td .td_wrap {
    width: 100%;
    height: 22px;
    line-height: 22px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.editor_box {
    width: 100%;
    height: 24px;
    line-height: 24px;
    border: 1px Solid #eee;
    font-size: 12px;
    font-family: "宋体";
    box-sizing: border-box;
    padding-left: 6px;
}
.clip_btn {
    position: absolute;
    top: 1px;
    right: 6px;
    cursor: pointer;
    color: #33F;
}

.td_wrap {
    width: 100%;
    height: 28px;
    line-height: 28px;
    position: relative;
    overflow: hidden;
    padding: 0px 4px 0px 4px;
}


.game_title {
    font-size: 18px;
    color: red;
    font-family: "Microsoft Yahei";
}

.number_editor {
    width: 200px;
    height: 30px;
    border: 1px Solid #CCC;
    position: relative;
}

.box_container {
    margin-top: 0px;
    width: 100%;
    box-sizing: border-box;
    border: 1px Solid #ccc;
    height: 575px;
    position: relative;
}

.tools {
    height: 80px;
    text-align: center;
    margin-top: -36px;
}

.tools .btn_create_tuijian {
    background: red;
    color: #FFF;
    display: inline-block;
    width: 200px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
}

.ex_page_tools {
    text-align: left;
    padding: 4px 0px 4px 0px;
    text-align: center;
}

.ex_page_btn.first, .ex_page_btn.last {
    background: #FFFFFF;
    border: 1px Solid #CCCCCC;
    font-weight: 100;
}


.ex_page_btn {
    font-size: 12px;
    width: auto;
    height: 22px;
    line-height: 22px;
    display: inline-block;
    padding: 0px 8px 0px 8px;
    background: #FFFFFF;
    color: #333333;
    margin: 0px 2px 0px 2px;
    border-radius: 2px;
    cursor: pointer;
    border: 1px Solid #cccccc;
    font-family: "Courier New",Courier,monospace;
    font-weight: bold;
}

.ex_page_btn.left_arrow {
    width: 24px;
    height: 22px;
    display: inline-block;
    padding: 0px;
}

.ex_page_btn.active {
    background: #fdf1f1;
    border: 1px Solid #F33;
}

.ex_page_btn.right_arrow {
    width: 24px;
    height: 22px;
    display: inline-block;
    padding: 0px;
}

.ex_page_go_container {
    width: 80px;
    height: 24px;
    box-sizing: border-box;
    display: inline-block;
    position: relative;
    margin: 0px 2px 0px 2px;
    border-radius: 2px;
    border: 1px Solid #CCCCCC;
    line-height: initial;
}




.ex_page_go_container .ex_page_go_edit {
    width: 100%;
    height: 21px;
    line-height: 21px;
    text-align: left;
    box-sizing: border-box;
    padding-left: 4px;
    border: none;
    outline: none;
}

.ex_page_go_container .ex_page_go {
    position: absolute;
    right: 0px;
    top: 0px;
    /*background: url(../img/btn_go.png);*/
    width: 24px;
    height: 22px;
    line-height: 22px;
    color: #33F;
}

.page_info {
    font-family: "Microsoft Yahei";
    color: #333;
    font-size: 14px;
    text-align: center;
}

.ex_mask_tipshow {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 9999;
    display: none;
}

.ex_mask_tipshow .ex_dialog.pop {
    animation: popdialog 0.3s ease-in;
}


.ex_mask_tipshow .ex_dialog {
    width: 424px;
    height: auto;
    background: #fff;
    margin: 0px auto;
    margin-top: 300px;
    border-radius: 5px;
    border: 1px Solid #dddddd;
    box-shadow: rgba(0,0,0,0.2) 0px 4px 4px;
    overflow: hidden;
}

.ex_mask_tipshow .ex_dialog ._title {
    height: 34px;
    line-height: 34px;
    color: #EA3A3A;
    background: #FBFBFB;
    box-sizing: border-box;
    padding-left: 1em;
    font-family: "Microsoft Yahei";
    font-weight: bold;
    position: relative;
    font-size: 16px;
}

.ex_mask_tipshow .ex_dialog ._title .btn_close {
    width: 16px;
    line-height: 16px;
    height: 16px;
    display: inline-block;
    background-image: url(__TEMPLATE__/webfile/daili_gb.png);
    background-size: 16px 16px;
    position: absolute;
    right: 8px;
    top: 8px;
    cursor: pointer;
    transition: all 0.5s;
}

.ex_mask_tipshow .ex_dialog ._content {
    padding: 10px;
    text-align: center;
    color: #333;
    height: 100px;
    font-size: 14px;
}

.ex_mask_tipshow .ex_dialog ._tools {
    text-align: center;
    padding: 6px 0px 6px 0px;
    background: #FBFBFB;
}

.ex_mask_tipshow .ex_dialog ._tools ._btn_ok {
    display: inline-block;
    background: #f13131;
    height: 30px;
    line-height: 30px;
    text-align: center;
    width: 100px;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}
</style>
<style type="text/css">
.slide_mask {
    position: absolute;
    background: rgba(0,0,0,.2);
    width: 1000%;
    height: 100%;
    top: 0;
    display: none;
    z-index: 900;
}
.slide_mask .slide_menu {
    position: absolute;
    bottom: 0;
    width: 10%;
    background: #f3f3f3;
    max-height: 240px;
    box-sizing: border-box;
}
.slide_mask .slide_menu .container {
    max-height: 210px;
    box-sizing: border-box;
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow: hidden;
    -webkit-overflow-y: auto;
}
.slide_mask .slide_menu .slide_menu_item {
    border-bottom: 1px SOlid #DDD;
    text-align: center;
    height: 38px;
    line-height: 38px;
    color: #666;
}
</style>

<style type="text/css">
	.slide_mask2 {
    position: absolute;
    background: rgba(0,0,0,.2);
    width: 1000%;
    height: 100%;
    top: 0;
    display: none;
    z-index: 900;
}
.slide_mask2 .slide_menu2 {
    position: absolute;
    bottom: 0;
    width: 10%;
    background: #f3f3f3;
    max-height: 240px;
    box-sizing: border-box;
}
.slide_mask2 .slide_menu2 .container2 {
    max-height: 210px;
    box-sizing: border-box;
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow: hidden;
    -webkit-overflow-y: auto;
}
.slide_mask2 .slide_menu2 .slide_menu_item2 {
    border-bottom: 1px SOlid #DDD;
    text-align: center;
    height: 38px;
    line-height: 38px;
    color: #666;
}
</style>
</head>
<body cz-shortcut-listen="true">
<div class="header">
	<div class="main main_btm_border">
		<div class="left logo">
			<a href="{:url('index/home')}" class="logo-link" id=""><span class="logo_image"></span>
			<style>
.logo_image{background-image:url(__ATTACHMENT__/{$logo.logoimg})!important}
			</style>
			</a>
		</div>
		<div class="right login_and_userinfo_1">
			<div class="login_header">
				<span class="welcome"></span>
				<div class="mobile_download" style="cursor:pointer">
					<i class="iconfont"></i><i class="iconfont"></i><span class="">手机app下载</span>
				</div>
			</div>
		</div>
	</div>
</div>
<div id="model_2" class="model_2" style="display:none">
	<div class="model_header">
		<h1>温馨提醒</h1>
	</div>
	<div class="model_body">
		<span id="model_content"></span>
	</div>
	<div class="foot_succ">
		<a onclick="jQuery.modal.close()" class="btn btn-default btn-radius">确定</a>
	</div>
</div>
<div class="main usercenter">
	<div class="user_usersafe">
		<div class="user_menu left">
			<h2>会员中心</h2>
			<ul>
				<li><i class="iconfont"></i><a href="{:url('user/index')}">个人中心</a></li>
				<li><i class="iconfont"></i><a class="user_goto_finance" href="{:url('user/recharge')}">财务中心</a></li>
				<li><i class="iconfont"></i><a href="{:url('user/callRecord')}">交易记录</a></li>
				<!-- 	<li><i class="iconfont"></i><a href="{:url('user/detail')}">详细设定</a></li> -->
				<li><i class="iconfont"></i><a href="{:url('user/peilvdetail')}">赔率详情</a></li>
				<li><i class="iconfont"></i><a href="{:url('user/message')}">信息公告</a></li>
				 <li><i class="iconfont"></i><a href="{:url('user/djsm')}">等级说明</a></li>
			</ul>
			
			<h2>代理中心</h2>
			<ul>
			
				<li><i class="iconfont"></i><a class="user_goto_finance" href="{:url('user/dlCentent')}">代理说明</a></li>
				{if($f.dl==1)}
				<li><i class="iconfont"></i><a href="{:url('user/dailibaobiao')}">代理报表</a></li>
				<li><i class="iconfont"></i><a href="{:url('user/xiajibaobiao')}">下级报表</a></li> 
				<li class="hover"><i class="iconfont"></i><a href="{:url('user/xiajikaihu')}">下级开户</a></li>
				<!--<li><i class="iconfont"></i><a href="{:url('user/xiajiguanli')}">下级管理</a></li>-->
				<li><i class="iconfont"></i><a href="{:url('user/touzhumingxi')}">投注明细</a></li>
				<li><i class="iconfont"></i><a href="{:url('user/jiaoyimingxi')}">交易明细</a></li>
				{else/}
				<li><i class="iconfont"></i><a href="{:url('user/shenqing')}">代理申请</a></li>
				{/if}
			</ul>
		</div>
		
		<div style="width: 820px;border: 1px solid #999999;margin-left: 175px;padding-top: 10px;height: 605px;position: relative;" >
			
			<div class="box_menu">
	            <div data-id="childcreate" class="no_select menu_item active kaihu">下级开户</div>
	            <div data-id="tuijianmgr" class="no_select menu_item yqm">邀请码管理</div>
	            <!--<div data-id="webmgr" class="no_select menu_item">域名管理</div>-->
           	</div>
			<div class="box_container" id="dialog_childcreate" style="display:block;">
            <!--<div class="_box1">
                开户类型: <div data-id="7" class="create_check_actype check_box active">代理</div> <div data-id="0" class="check_box">会员</div>
                <a class="btn_show_fandian_table no_select" href="/index.php/index/fandiantable" target="_blank"> 点击查看返点赔率表</a>
            </div>-->
            <div class="_box2">
                下级返点赔率设置
            </div>
            <div class="_box3">
            <form class="aaaaa" method="post" name="form">
                <div style="padding: 0px 0px 10px 10px;border-bottom: 1px dashed #999;">
                	返点：
                	<input type="number" name="number" id="fp_ssc" value="" placeholder="<<?php echo sprintf( '%.1f ',$user['fandian']); ?>" style="display: inline-block;width: 50px;height: 20px;border-radius: 5px;border: 1px solid #999;text-align: center;" />
                </div>
                <div class="tools" id="yaoqingma">
                    <a href="javascript:;" class="btn_create_tuijian">生成邀请码</a>
                </div>
                </form>
                <script>
					$("#yaoqingma").click(function(){
						var a=$("#fp_ssc").val();
						if(a==''){
                            alert('返点不能为空');
                            return false;
                        }
                        if(a<=0){
                            alert('返点不能小于0');
                            return false;
                        }
						if(a>{$user.fandian}){
                            alert('返点值不能超过{$user.fandian}');
                        }else{
                            $(".aaaaa").submit();
						}
					})
				</script>
                <div class="shengcheng_table"  style="margin-top: -32px;">
            			<table class="ex_custom_table">
            			<thead>
            				<tr> 
            					<td width="40%">返点</td>
            					<td>邀请码</td>
            				</tr>
            			</thead>
            			<tbody>
            			{foreach ($tjm as $v)}
            				<tr class="yqm_{$v[0]}">
            					<td>
            						<div class="td_wrap">
            							<input class="editor_box" style="text-align:center;" type="text" readonly="readonly" value="{$v[1]}">
            							<a class="clip_btn fuzhi_a " data-clipboard-text="{$v[1]}">复制</a>
            						</div>
            					</td> 
            					<td>
            						<div class="td_wrap">
            							<input class="editor_box" type="text" style="text-align:center;" readonly="readonly" value="{$v[0]}">
            							<a class="clip_btn fuzhi_b" data-clipboard-text="{$v[0]}">复制</a>
            						</div>
            					</td>
            				</tr>
            			{/foreach}
            			</tbody>
            		</table>
            		</div>
            </div>
            
            
            
        </div>
        
        
        
        <div id="" class="yaoqingma">
        	<div class="box_container" style="">
            <div class="_box1">
                开户类型: <div data-id="1" class="check_showjoincode check_box active_d dl_tbody">代理</div> 
                <div data-id="0" class="check_showjoincode check_box hy_tbody">会员</div>
            </div>
            <div class="_box3" id="tuijian_table_container">
            	<div class="ex_page">
            		<div class="daili_table"  style="display: block;">
            			<table class="ex_custom_table">
            			<thead>
            				<tr> 
            					<td width="20%">邀请码</td>
            					<td>网址</td>
            					<td>操作</td>
            				</tr>
            			</thead>
            			<tbody>
            			{foreach($tjm as $key=>$va)}
            				<tr class="yqm_{$va.0}">
            					<td>
            						<div class="td_wrap td_wrap_daili">
            							<input class="editor_box" type="text" readonly="readonly" value="{$va.0}">
            							<a class="clip_btn fuzhi_a" data-clipboard-text="{$va.0}">复制</a> |
            						</div>
            					</td> 
            					<td>
            						<div class="td_wrap">
            							<input  id="vvv{$key}" class="editor_box td_wrap_a" type="text" readonly="readonly" value="{$ymxz.0.domain}?vip={$va.0}">
            							<a class="clip_btn fuzhi_b">复制</a>
            						</div>
            					</td>
                                <td>
                                    <div class="td_wrap td_wrap_daili">
                                        <a class="clip_btn" href="javascript:;" onclick="delYaoqing('{$va.0}')">删除</a>
                                    </div>
                                </td>
            				</tr>
            				{/foreach}	

            			</tbody>
            			
            			
            			
            		</table>
            		</div>
            		
            		
            		<div class="huiyuan_table"  style="display: none;">
            			<table class="ex_custom_table">
            			<thead>
            				<tr> 
            					<td width="20%">邀请码</td>
            					<td>网址</td>

            				</tr>
            			</thead>
            			<tbody>
            			
            				<tr data-id="7738" data-idx="0"> 
            					<td>
            						<div class="td_wrap td_wrap2">
            							<input class="editor_box td_wrap_huiyuan" type="text" readonly="readonly" value="{$tjmold}">
            							<a class="clip_btn fuzhi_a " data-clipboard-text="{$tjmold}">复制</a>
            						</div>
            					</td> 
            					<td>
            						<div class="td_wrap pc_huiyuan huiyuan_ym">
            							<input class="editor_box td_wrap_b" type="text" readonly="readonly" value="{$ymxz.0.domain}?vip={$tjmold}">
            							<a class="clip_btn fuzhi_b">复制</a>
            						</div>
            					</td>
            				</tr>
            			</tbody>
            		</table>
            		</div>
            	</div>
            </div>
        </div>
        </div>
			
			
		<div class="slide_mask" id="slideMenu_domain" data-target="select_domain" style="display: none;">
			<div class="slide_menu">
				<div class="container">

					{volist name="ymxz" id="v" key="k"}
					<div class="slide_menu_item" data-value="{$k}">{$v.domain}</div>
					{/volist}

				</div>
			</div>
		</div>
		
		
		<div class="slide_mask2" id="slideMenu_domain2" data-target="select_domain" style="display: none;">
			<div class="slide_menu2">
				<div class="container2">

					{volist name="ymxz" id="v" key="k"}
					<div class="slide_menu_item2" data-value="{$k}">{$v.domain}</div>
					{/volist}

				</div>
			</div>
		</div>
		
      </div>
	</div>
		
		
</div>
</div>


<div class="ex_mask_tipshow" style="display: none;">
	<div class="ex_dialog pop">
		<div class="_title">温馨提示 <div class="btn_close"></div></div>
		<div class="_content">复制成功!</div>
		<div class="_tools"><a class="_btn_ok" href="javascript:;">确定</a></div>
	</div>
</div>




</body>
</html>
<script type="text/javascript">
	$(".box_menu").children('div').click(function(){
		$(this).addClass('active').siblings('div').removeClass('active');
	})
	
	$(".kaihu").click(function(){
		$("#dialog_childcreate").css('display','block');
		$(".yaoqingma").css('display','none');
	})
	
	$(".yqm").click(function(){
		$("#dialog_childcreate").css('display','none');
		$(".yaoqingma").css('display','block');
	})
	
	$("._box1").children('div').click(function(){
		$(this).addClass('active_d').siblings('div').removeClass('active_d');
	})
	
		$('.fuzhi_a').click(function()
		{
	
			
		var time = $(this).siblings('input');
		var Url2=time;
		Url2.select(); // 选择对象
		document.execCommand("Copy"); // 执行浏览器复制命令
		 $('.ex_mask_tipshow').css('display','block')

     })
	
	
	$('.fuzhi_b').click(function()
		{
		
			
		var time = $(this).siblings('input');
		var Url2=time;
		Url2.select(); // 选择对象
		document.execCommand("Copy"); // 执行浏览器复制命令
		 $('.ex_mask_tipshow').css('display','block')

     })
	
	$(".dl_tbody").click(function(){
		$(".daili_table").css('display','block');
		$(".huiyuan_table").css('display','none');
	})
	
	$(".hy_tbody").click(function(){
		$(".daili_table").css('display','none');
		$(".huiyuan_table").css('display','block');
	})
	
	$('._tools').click(function(){
		$('.ex_mask_tipshow').css('display','none');
	})
	
	$(".btn_close").click(function(){
		$(".ex_mask_tipshow").css('display','none');
	})
	
//	$('.tools').click(function(){
//		$(".shengcheng_table").toggle();
//	})
	
	$(".td_wrap_b").click(function(){
		$("#slideMenu_domain2").css('display','block');
	})
	
	$(".slide_mask2").click(function(){
		$("#slideMenu_domain2").css('display','none');
	})
	
	$(".td_wrap_a").click(function(){
		$("#slideMenu_domain").css('display','block');
	})
	
	$(".slide_mask").click(function(){
		$("#slideMenu_domain").css('display','none');
	})
	
	$(".td_wrap_a").click(function(){
		var id=$(this).attr('id');
		var tjm = $(this).parents('.td_wrap').parents('td').siblings('td').children('div').children('input').val();
		console.log(tjm);
		console.log(id);
		$("#slideMenu_domain").css('display','block');
		$(".container").children('div').click(function(){
			var div = $(this).html()+'?vip='+tjm;
			
			$('#'+id).val(div);
			$("#slideMenu_domain").css('display','none');
			id='';
		})
		
	})
	
    $("#slideMenu_domain2").children('.slide_menu2').children('.container2').children('div').click(function(){

            var tjm = $('.td_wrap2 input').val();
            console.log(tjm);
            var a = $(this).html()+"?vip="+tjm;
            $('.huiyuan_ym').children('input').val(a);
        })
    function delYaoqing(yzm){
        $.ajax({
            type:'POST',
            url:"../../api/member/yaoqingmaDelete",
            data:{
                'key':yzm
            },
            success:function(data){
                if(data==1){
                    alert('删除成功');
                    $('.yqm_'+yzm).remove();
                }else{
                    alert('删除失败');
                }
            }
        })
    }
</script>